<?php

namespace Common\Tag;
use Think\Template\TagLib;

class My extends TagLib
{
    // 定义标签
    protected $tags = array(
        'commonheader' => array('attr' => '', 'close' => 0),
        'commonfooter' => array('attr' => '', 'close' => 0),
        'bstablecss' => array('attr' => '', 'close' => 0),
        'bstablejs' => array('attr' => '', 'close' => 0),
        'jqnestablejs' => array('attr' => '', 'close' => 0),

        'header' => array('attr' => '', 'close' => 0),
    );

    /**
     * bootstrap-table文件
     */

    public function _bstablecss()
    {
        $str = <<<php
<link rel="stylesheet" href="__PUBLIC__/asset/vendor/bootstrap-table/bootstrap-table.min.css" type="text/css">

php;
        return $str;
    }

    public function _bstablejs()
    {
        return '<script src="__PUBLIC__/asset/vendor/bootstrap-table/bootstrap-table.min.js"></script>';
    }

    public function _jqnestablejs()
    {
        $str = <<<php
<script src="__PUBLIC__/asset/vendor/jquery.nestableNoDrag.js"></script>
<script src="__PUBLIC__/asset/vendor/jquery.sortable.js"></script>

php;

        return $str;
    }

    /**
     * 页面公共头文件
     */
    public function _commonheader()
    {
        $str = <<<php
<!-- page level plugin styles -->


    <!-- /page level plugin styles -->
    <!-- core styles -->
    <link rel="stylesheet" href="__ROOT__/Public/asset/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/font-awesome.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/animate.min.css">
    <!-- /core styles -->

    <!-- template styles -->
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/main.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/skins/palette.4.css" id="skin">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/style.1.css" id="font">

    <!-- template styles -->

    <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
    <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
    <script src="https://oss.maxcdn.com/libs/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
php;
        return $str;
    }



    /**
     * 公共头文件v2
     */

    public function _header()
    {
        $str = <<<php
<!DOCTYPE html>
<html lang="en" class="csstransforms csstransforms3d csstransitions"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <title>心秘籍</title>
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="description" content="">
    <meta name="author" content="">

    <!--<link href="__PUBLIC__/css/newhome/bootstrap.css" rel="stylesheet">-->

    <link rel="stylesheet" href="__ROOT__/Public/asset/bootstrap/css/bootstrap.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/font-awesome.min.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/animate.min.css">

    <link rel="stylesheet" href="__ROOT__/Public/asset/css/style.1.css" id="font">

    <link rel="stylesheet" href="__ROOT__/Public/asset/css/bg_style_main.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/main.css">
    <link rel="stylesheet" href="__ROOT__/Public/asset/css/page_style.css">





    <link rel="stylesheet" id="main-color" href="__PUBLIC__/asset/css/skins/skin-bluedark.css" media="screen">


    <link href="__PUBLIC__/asset/css/icons.css" rel="stylesheet">



    <link href="__PUBLIC__/asset/bootstrap/css/bootstrap-responsive.css" rel="stylesheet">


    <script>
        if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.match(/6./i)=="6."){
            alert("你的IE版本过低，或使用 火狐Firefox / Chrome / IE10+ /360极速模式访问以获得最佳效果");
        }
        else if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.match(/7./i)=="7."){
            alert("你的IE版本过低，或使用 火狐Firefox / Chrome / IE10+ /360极速模式访问以获得最佳效果");
        }
        else if(navigator.appName == "Microsoft Internet Explorer" && navigator.appVersion.match(/8./i)=="8."){
            alert("你的IE版本过低，或使用 火狐Firefox / Chrome / IE10+ /360极速模式访问以获得最佳效果");
        }
    </script>
</head>
php;
        return $str;
    }

    /**
     * 页面公共脚文件
     */

    public function _commonfooter()
    {
        $str = <<<php
<!-- core scripts -->
<script src="__ROOT__/Public/asset/vendor/jquery-1.11.1.min.js"></script>
<script src="__ROOT__/Public/asset/bootstrap/js/bootstrap.js"></script>
<script src="__ROOT__/Public/asset/vendor/jquery.easing.min.js"></script>
<script src="__ROOT__/Public/asset/vendor/jquery.placeholder.js"></script>
<script src="__ROOT__/Public/asset/vendor/fastclick.js"></script>
<!-- /core scripts -->
<!-- /core scripts -->

<!-- page level scripts -->
<!--script src="./list.js"></script>
<!-- /page level scripts -->
php;
        return $str;
    }


}
